package org.wjk.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @GetMapping("/test")
    @PreAuthorize("hasAnyAuthority('test')")/*指定访问该方法的权限标识*/
    public String testCorsOrign(){
        return "跨域访问成功";
    }
}
